{% extends "catalog/base_generic.html" %}

{% block content %}
    <h1>续借书籍: {{ book_instance.book.title }}</h1>
    <p>借阅者: {{ book_instance.borrower }}</p>
    <p{% if book_instance.is_overdue %} class="text-danger"{% endif %}>应归还日期: {{ book_instance.due_back }}</p>

    <form action="" method="post">
        {% csrf_token %}
        <div class="form-group">
            <label for="{{ form.renewal_date.id_for_label }}">续借日期:</label>
            {{ form.renewal_date }}
            <p class="help-block">{{ form.renewal_date.help_text }}</p>
        </div>
        <div class="form-group mt-3">
            <button type="submit" class="btn btn-primary">提交</button>
            <a href="{% url 'all-borrowed' %}" class="btn btn-secondary">取消</a>
        </div>
    </form>
{% endblock %}